import request from '@/utils/http'; // 导入http中创建的axios实例
import qs from "qs"
const caigou = {
	//获取指定日期的采购信息
	caigous(params){
		let post_param = qs.stringify(params)
		
		return request({
			url: '/admins/purchase/gen?'+ post_param,
			method: 'get',
			
		})
	},
	//提交指定日期的采购信息 生成团购日期
	tijiao(params){
		// let post_param = qs.stringify(params)
		
		return request({
			url: '/admins/purchase/gen',
			method: 'post',
			data:params
			
		})
	},
	//获取团购日期列表
	activity(params){
		// let post_param = qs.stringify(params)
		
		return request({
			url: '/commons/activity/list',
			method: 'get',
			
		})
	},
	//根据日期获取  采购汇总
	purchase(params){
		let post_param = qs.stringify(params)
		
		return request({
			url: '/admins/purchase/list?'+ post_param,
			method: 'get',
			
		})
	},
	//根据日期获取  分拣汇总
	purchaseSorting(params){
		let post_param = qs.stringify(params)
		
		return request({
			url: '/admins/purchaseSorting/list?'+ post_param,
			method: 'get',
			
		})
	},
	//根据日期获取  根据店铺分拣汇总
	shopList(params){
		let post_param = qs.stringify(params)
		
		return request({
			url: '/admins/purchaseAgentShop/list?'+ post_param,
			method: 'get',
			
		})
	},
	//根据店铺获取 分拣商品
	purchaseSortings(params){
		let post_param = qs.stringify(params)
		
		return request({
			url: '/admins/purchaseSorting/list?'+ post_param,
			method: 'get',
			
		})
	},
	//分拣确认
	purchaseSorting_apply(params){
		// let post_param = qs.stringify(params)
		
		return request({
			url: '/admins/purchaseAgentShop/apply',
			method: 'post',
			data:params
			
		})
	},
	//商家 获取自己到店订单状态 
	purchaseAgentShop_info(params){
		let post_param = qs.stringify(params)
		
		return request({
			url: '/shops/purchaseAgentShop/info?'+post_param,
			method: 'get',
			// data:params
			
		})
	},
	//商家 获取自己到店商品详细
	purchaseSorting_list(params){
		let post_param = qs.stringify(params)
		
		return request({
			url: '/shops/purchaseSorting/list?'+post_param,
			method: 'get',
			// data:params
			
		})
	},
	//商家 确认到货
	purchaseAgentShop_apply(params){
		// let post_param = qs.stringify(params)
		
		return request({
			url: '/shops/purchaseAgentShop/apply',
			method: 'post',
			data:params
			
		})
	},
}
export default caigou